package com.study.sqlSession;

import com.study.config.XMLConfigBuilder;
import com.study.pojo.Configuration;

import java.io.InputStream;

public class SqlSessionFactoryBuilder {

    public SqlSessionFactory build(InputStream inputStream) throws Exception {
        XMLConfigBuilder xmlConfigBuilder = new XMLConfigBuilder();
        Configuration configuration = xmlConfigBuilder.parseConfig(inputStream);
        return new SqlSessionFactoryImpl(configuration);
    }
}
